StringScanner.SkipToDigit Function

Syntax

Result_Flag as L = SkipToDigit as l()

Arguments

Result_Flag

True if an digit was found.

Description

Skip until a digit (0-9) is encountered. Return true if successful.

Discussion

The <StringScanner>.SkipToDigit() function moves the offset to the next digit (0-9). The offset does not move if it is already pointing to a digit.

Example

dim scanner as P
dim txt as C
txt = <<%text%
This is wonderful prose written
by a technical 12 writer of note.
%text%
scanner = stringscanner.create(txt)
? scanner.skiptodigit()
= .T.
? scanner.GetToOffset()
= This is wonderful prose written
by a technical
? scanner.GetRemainder()
= 12 writer of note.

See Also